package lab1;

import java.awt.*;

public class Account {
	private static long sotk=100;
	private static String tentk;
	private static double sotien;
	final float laixuat = 0.02f;
	private Object tien;
	private Object sotienchuyen;
	public Account(long sotk,String tentk,double sotien)
	{
		this.sotien = sotien;
		this.sotk = sotk;
		this.tentk = tentk;
	}
	public double getSotien() {
		return sotien;
	}
	public void setSotien(double sotien) {
		this.sotien = sotien;
	}
	public long getSoTK(){
		return sotk;
	}
	public void setSoTK(long sotk){
		this.sotk = sotk;
	}
	public String getTenTK(){
		return tentk;
	}
	public void setTenTK(String tentk){
		this.tentk = tentk;
	}	
	public void naptien(double sotiennap)
	{
		if(sotiennap<0)
		{
			System.out.printf("Ban can nap tien vao day");
		}
		else
		{
			this.sotien = sotien + sotiennap;
		}
	}
	public void ruttien(double sotienrut)
	{
		final double phirut = 10000;
		if(sotienrut<30000)
		{
			System.out.printf("Ban can nhap toi thieu 50000vnd");
		}
		else
		{
			this.sotien = sotien - (sotienrut + phirut);
		}
	}
	public void daohan()
	{
		this.sotien = sotien + sotien*laixuat;
	}
	public double chuyentien(Account A1,Account A2,double sotienchuyen)
	{
		if(A1.getSotien()<sotienchuyen)
		{
			System.out.printf("Tai khoan khong du tien de nap");
		}
		else
		{
			A1.sotienchuyen = A2.sotienchuyen;
		}
		return sotienchuyen;
	}
	public static void main(String[] args)
	{
			Account acc = new Account(sotk, tentk, sotien);
	}
}

